package com.luzh.myspring.bean.processor;

import com.luzh.myspring.beans.BeanException;
import com.luzh.myspring.beans.factory.config.BeanPostProcessor;

/**
 * 自定义bean修改器
 */
public class MyPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeanException {
        System.out.println("前置修改器");
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeanException {
        System.out.println("后置修改器");
        return bean;
    }
}
